package school.valon.persistence.pojo;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.persistence.*;

import java.util.Date;

/**
 * The persistent class for the staff_attendance database table.
 * 
 */
@Entity
@Table(name="staff_attendance")
@NamedQueries({
@NamedQuery(name="StaffAttendance.findAll", query="SELECT s FROM StaffAttendance s"),
@NamedQuery(name="StaffAttendance.deleteById", query="DELETE FROM StaffAttendance WHERE staffAttendanceId = :P1")
})
public class StaffAttendance implements Serializable {

	private static final long serialVersionUID = 6542711323383402842L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="staff_attendance_id")
	private Integer staffAttendanceId;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="attendance_date")
	private Date attendanceDate;

	@Column(name="attended_hours")
	private BigDecimal attendedHours;

	//bi-directional many-to-one association to Staff
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="staff_id")
	private Staff staff;

	public Integer getStaffAttendanceId() {
		return this.staffAttendanceId;
	}

	public void setStaffAttendanceId(Integer staffAttendanceId) {
		this.staffAttendanceId = staffAttendanceId;
	}

	public Date getAttendanceDate() {
		return this.attendanceDate;
	}

	public void setAttendanceDate(Date attendanceDate) {
		this.attendanceDate = attendanceDate;
	}

	public BigDecimal getAttendedHours() {
		return this.attendedHours;
	}

	public void setAttendedHours(BigDecimal attendedHours) {
		this.attendedHours = attendedHours;
	}

	public Staff getStaff() {
		return this.staff;
	}

	public void setStaff(Staff staff) {
		this.staff = staff;
	}

}